# Context

## Variables preset by the framework

| Var | Scope | Contents                                                             |
|-----|-------|----------------------------------------------------------------------|
| `s` | Any   | Static variables imported from the `config.toml` section `pagedata`  |
| `d` | DataD | Current data item variables                                          |
| `u` | Any   | Current user session variables                                       |
| `authenticated` | Any | true if the user has been authenticated                    |

## Data item fields

All vars defined in the document's front matter are imported to the context.

The following vars are required in the front matter

| Var          | Contents                                                            |
|--------------|---------------------------------------------------------------------|
| `d.title`    | page title                                                          |
| `d.subtitle` | page subtitle                                                       |

in addition to vars defined in the document's front matter, the following are set

* `d.content_html` - the (raw) HTML generated from the page's markdown

# User session fields

TODO